package com.wft.chapter15;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class TestSystemIn {
    public static void main(String[] args) {
        try {
            FileInputStream fileInputStream = new FileInputStream("C:\\Users\\wft740\\Desktop\\前端访问地址.txt");
            System.setIn(fileInputStream);
            Scanner scanner = new Scanner(System.in,"GBK");
            scanner.useDelimiter("\n");
            while(scanner.hasNext()){
                System.out.println(scanner.nextLine());
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
}
